package com.itheima.Demo;

import java.io.*;

public class Demo输出转换流 {
    public static void main(String[] args) throws IOException {
        //OutputStreamWriter(OutputStream in, String charsetName) : 创建一个指定字符集的字符流
        //在window软件中显示ANSI就是GBK
        OutputStreamWriter osw  = new OutputStreamWriter(new FileOutputStream("C:\\Users\\97622\\Desktop\\123.txt"),"UTF-8");
        //可以使用字符流方法

        //写出一个字符
        osw.write("我爱你你却爱着一个傻逼");
        osw.close();
    }
}
